package com.yanqu.road.entity.task;


import com.yanqu.road.entity.DataObject;

import java.math.BigInteger;
import java.util.Date;
import java.util.Objects;


public class UserTaskData extends DataObject {

	private long userId;

	private int taskId;

	private int taskType; // 任务类型

	private int preTaskId; // 上次任务id

	private int state = 1;

	private Date startTime;

	private Date endTime;

	private long finishTime;

	private BigInteger value = BigInteger.ZERO;

	private boolean isDelete;

	public UserTaskData() {
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		if(this.userId != userId) {
			this.userId = userId;
			setUpdateOption();
		}
	}

	public int getTaskId() {
		return taskId;
	}

	public void setTaskId(int taskId) {
		if(this.taskId != taskId) {
			this.taskId = taskId;
			setUpdateOption();
		}
	}

	public int getTaskType() {
		return taskType;
	}

	public void setTaskType(int taskType) {
		if(this.taskType != taskType) {
			this.taskType = taskType;
			setUpdateOption();
		}
	}

	public int getPreTaskId() {
		return preTaskId;
	}

	public void setPreTaskId(int preTaskId) {
		if(this.preTaskId != preTaskId) {
			this.preTaskId = preTaskId;
			setUpdateOption();
		}
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		if(this.state != state) {
			this.state = state;
			setUpdateOption();
		}
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		if(this.startTime != startTime) {
			this.startTime = startTime;
			setUpdateOption();
		}
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		if(this.endTime != endTime) {
			this.endTime = endTime;
			setUpdateOption();
		}
	}

	public long getFinishTime() {
		return finishTime;
	}

	public void setFinishTime(long finishTime) {
		if(this.finishTime != finishTime) {
			this.finishTime = finishTime;
			setUpdateOption();
		}
	}

	public BigInteger getValue() {
		return value;
	}

	public void setValue(BigInteger value) {
		if(!Objects.equals(this.value, value)) {
			this.value = value;
			setUpdateOption();
		}
	}

	public boolean isDelete() {
		return isDelete;
	}

	public void setDelete(boolean delete) {
		isDelete = delete;
		setUpdateOption();
	}
}
